package com.cskaoyan.mapper;

import com.cskaoyan.bean.Order;
import com.cskaoyan.bean.OrderExample;
import com.cskaoyan.bean.ShipBO;
import com.cskaoyan.bean.stat.GoodsStatVO;
import com.cskaoyan.bean.stat.OrderStatVO;
import com.cskaoyan.bean.wxorder.vo.WxOrderDetailOrderInfo;
import com.cskaoyan.bean.wxorder.vo.WxOrderListData;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {
    long countByExample(OrderExample example);

    int deleteByExample(OrderExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Order record);

    int insertSelective(Order record);

    List<Order> selectByExample(OrderExample example);

    Order selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Order record, @Param("example") OrderExample example);

    int updateByExample(@Param("record") Order record, @Param("example") OrderExample example);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    int updateRefundOrder(@Param("id") Integer id, @Param("refundMoney") Double refundMoney);

    int updateShipOrder(@Param("shipBO") ShipBO shipBO);

   //int selectOrdersNumber();

    Integer selectTotalOrder();


   Integer queryOrderOfUser(@Param("userId") Integer userId, @Param("orderStatus") Short orderStatus);

   // List<Integer> queryRecvGoodsOfUser(@Param("userId") Integer userId);

    Integer queryNeedCommentOrder(@Param("userId") Integer userId);

    List<OrderStatVO> queryOrderStat();

    List<GoodsStatVO> queryGoodsStat();

    List<WxOrderListData> selectWxOrderListDataByUserId(@Param("id") Integer id, @Param("orderStatus") Integer orderStatus);

    WxOrderDetailOrderInfo selectWxOrderDetailOrderInfoById(@Param("orderId") Integer orderId);
}
